<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .d1,
    .f1 {
        width: 100px;
        height: 100px;
    }
    
    .d1 {
        display: inline-block;
        background-color: pink;
    }
    
    .f1 {
        float: left;
        background-color: skyblue;
    }
</style>

<body>

    <div class="d1"></div>
    <div class="f1"></div>
</body>

</html>